// abstract class CanFixComputer {
//   factory CanFixComputer._() {
//     return _CanFixComputerImpl();
//   }

//   void fixComputer();
// }

mixin _CanFixComputerImpl {
  void fixComputer() {
    print('软件工程师修电脑');
  }
}

// abstract class CanProgramming {
//   factory CanProgramming._() {
//     return _CanProgramingImpl();
//   }

//   void programming();
// }

mixin _CanProgramingImpl {
  void programming() {
    print('码农正在写代码');
  }
}

abstract class Worker {
  void doWork();
}

class Teacher extends Worker {
  void doWork() {
    print("老师在上课");
  }
}

class Engineer extends Worker {
  void doWork() {
    print("工程师在工作");
  }
}

class SoftwareEngineer extends Engineer
    with _CanFixComputerImpl, _CanProgramingImpl {
  @override
  void fixComputer() {
    print('软件工程师修电脑');
  }

  @override
  void programming() {
    print('码农正在写代码');
  }
}

class ITTeacher extends Teacher with _CanFixComputerImpl {
  @override
  void fixComputer() {
    print('IT教师修电脑');
  }
}

main() {
  ITTeacher()
    ..doWork()
    ..fixComputer();

  SoftwareEngineer()
    ..doWork()
    ..fixComputer()
    ..programming();
}
